using Microsoft.VisualBasic.CompilerServices;
using SJVars;
using Spacejock;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Windows.Forms;
using yW5Lib;
using yWriter6.My.Resources;

namespace yWriter6
{
	[DesignerGenerated]
	internal class frmEditLocation : Form
	{
		public delegate void FinishedEventHandler(bool Cancelled);

		private IContainer components;

		public ToolTip ToolTip1;

		[CompilerGenerated]
		[AccessedThroughProperty("cmdOK")]
		private Button _cmdOK;

		[CompilerGenerated]
		[AccessedThroughProperty("cmdExit")]
		private Button _cmdExit;

		[CompilerGenerated]
		[AccessedThroughProperty("Image1")]
		private PictureBox _Image1;

		[CompilerGenerated]
		[AccessedThroughProperty("TabControl1")]
		private TabControl _TabControl1;

		[CompilerGenerated]
		[AccessedThroughProperty("TabPage1")]
		private TabPage _TabPage1;

		[CompilerGenerated]
		[AccessedThroughProperty("TabImage")]
		private TabPage _TabImage;

		[CompilerGenerated]
		[AccessedThroughProperty("Picture1")]
		private PictureBox _Picture1;

		[CompilerGenerated]
		[AccessedThroughProperty("txtImageFile")]
		private TextBox _txtImageFile;

		[CompilerGenerated]
		[AccessedThroughProperty("cmdSelectImage")]
		private Button _cmdSelectImage;

		[CompilerGenerated]
		[AccessedThroughProperty("Image2")]
		private PictureBox _Image2;

		[CompilerGenerated]
		[AccessedThroughProperty("lblImageData")]
		private Label _lblImageData;

		[CompilerGenerated]
		[AccessedThroughProperty("cmdClearPic")]
		private Button _cmdClearPic;

		[CompilerGenerated]
		[AccessedThroughProperty("TableLayoutPanel1")]
		private TableLayoutPanel _TableLayoutPanel1;

		[CompilerGenerated]
		[AccessedThroughProperty("txtTags")]
		private TextBox _txtTags;

		[CompilerGenerated]
		[AccessedThroughProperty("Label1")]
		private Label _Label1;

		[CompilerGenerated]
		[AccessedThroughProperty("Label3")]
		private Label _Label3;

		[CompilerGenerated]
		[AccessedThroughProperty("txtDesc")]
		private RichTextBox _txtDesc;

		[CompilerGenerated]
		[AccessedThroughProperty("txtTitle")]
		private TextBox _txtTitle;

		[CompilerGenerated]
		[AccessedThroughProperty("txtAKA")]
		private TextBox _txtAKA;

		[CompilerGenerated]
		[AccessedThroughProperty("Label2")]
		private Label _Label2;

		[CompilerGenerated]
		[AccessedThroughProperty("Label4")]
		private Label _Label4;

		[CompilerGenerated]
		private FinishedEventHandler FinishedEvent;

		public bool Saved;

		private clsLocation CurrentLocation;

		private clsProject cProject;

		public virtual Button cmdOK
		{
			[CompilerGenerated]
			get
			{
				return _cmdOK;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = cmdOK_Click;
				Button cmdOK = _cmdOK;
				if (cmdOK != null)
				{
					cmdOK.Click -= value2;
				}
				_cmdOK = value;
				cmdOK = _cmdOK;
				if (cmdOK != null)
				{
					cmdOK.Click += value2;
				}
			}
		}

		public virtual Button cmdExit
		{
			[CompilerGenerated]
			get
			{
				return _cmdExit;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = cmdExit_Click;
				Button cmdExit = _cmdExit;
				if (cmdExit != null)
				{
					cmdExit.Click -= value2;
				}
				_cmdExit = value;
				cmdExit = _cmdExit;
				if (cmdExit != null)
				{
					cmdExit.Click += value2;
				}
			}
		}

		[field: AccessedThroughProperty("Image1")]
		public virtual PictureBox Image1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("TabControl1")]
		internal virtual TabControl TabControl1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("TabPage1")]
		internal virtual TabPage TabPage1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("TabImage")]
		internal virtual TabPage TabImage
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Picture1")]
		public virtual PictureBox Picture1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtImageFile")]
		public virtual TextBox txtImageFile
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		public virtual Button cmdSelectImage
		{
			[CompilerGenerated]
			get
			{
				return _cmdSelectImage;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = cmdSelectImage_Click;
				Button cmdSelectImage = _cmdSelectImage;
				if (cmdSelectImage != null)
				{
					cmdSelectImage.Click -= value2;
				}
				_cmdSelectImage = value;
				cmdSelectImage = _cmdSelectImage;
				if (cmdSelectImage != null)
				{
					cmdSelectImage.Click += value2;
				}
			}
		}

		[field: AccessedThroughProperty("Image2")]
		public virtual PictureBox Image2
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("lblImageData")]
		public virtual Label lblImageData
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		public virtual Button cmdClearPic
		{
			[CompilerGenerated]
			get
			{
				return _cmdClearPic;
			}
			[MethodImpl(MethodImplOptions.Synchronized)]
			[CompilerGenerated]
			set
			{
				EventHandler value2 = cmdClearPic_Click;
				Button cmdClearPic = _cmdClearPic;
				if (cmdClearPic != null)
				{
					cmdClearPic.Click -= value2;
				}
				_cmdClearPic = value;
				cmdClearPic = _cmdClearPic;
				if (cmdClearPic != null)
				{
					cmdClearPic.Click += value2;
				}
			}
		}

		[field: AccessedThroughProperty("TableLayoutPanel1")]
		internal virtual TableLayoutPanel TableLayoutPanel1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtTags")]
		public virtual TextBox txtTags
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Label1")]
		public virtual Label Label1
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Label3")]
		public virtual Label Label3
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtDesc")]
		public virtual RichTextBox txtDesc
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtTitle")]
		public virtual TextBox txtTitle
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("txtAKA")]
		public virtual TextBox txtAKA
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Label2")]
		public virtual Label Label2
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		[field: AccessedThroughProperty("Label4")]
		public virtual Label Label4
		{
			get;
			[MethodImpl(MethodImplOptions.Synchronized)]
			set;
		}

		public event FinishedEventHandler Finished
		{
			[CompilerGenerated]
			add
			{
				FinishedEventHandler finishedEventHandler = FinishedEvent;
				FinishedEventHandler finishedEventHandler2;
				do
				{
					finishedEventHandler2 = finishedEventHandler;
					FinishedEventHandler value2 = (FinishedEventHandler)Delegate.Combine(finishedEventHandler2, value);
					finishedEventHandler = Interlocked.CompareExchange(ref FinishedEvent, value2, finishedEventHandler2);
				}
				while ((object)finishedEventHandler != finishedEventHandler2);
			}
			[CompilerGenerated]
			remove
			{
				FinishedEventHandler finishedEventHandler = FinishedEvent;
				FinishedEventHandler finishedEventHandler2;
				do
				{
					finishedEventHandler2 = finishedEventHandler;
					FinishedEventHandler value2 = (FinishedEventHandler)Delegate.Remove(finishedEventHandler2, value);
					finishedEventHandler = Interlocked.CompareExchange(ref FinishedEvent, value2, finishedEventHandler2);
				}
				while ((object)finishedEventHandler != finishedEventHandler2);
			}
		}

		[DebuggerNonUserCode]
		public frmEditLocation()
		{
			base.Activated += frmEditLocation_Activated;
			base.Load += frmEditLocation_Load;
			InitializeComponent();
		}

		[DebuggerNonUserCode]
		protected override void Dispose(bool Disposing)
		{
			if (Disposing && components != null)
			{
				components.Dispose();
			}
			base.Dispose(Disposing);
		}

		[System.Diagnostics.DebuggerStepThrough]
		private void InitializeComponent()
		{
			components = new System.ComponentModel.Container();
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(yWriter6.frmEditLocation));
			ToolTip1 = new System.Windows.Forms.ToolTip(components);
			cmdSelectImage = new System.Windows.Forms.Button();
			txtAKA = new System.Windows.Forms.TextBox();
			cmdOK = new System.Windows.Forms.Button();
			cmdExit = new System.Windows.Forms.Button();
			Image1 = new System.Windows.Forms.PictureBox();
			TabControl1 = new System.Windows.Forms.TabControl();
			TabPage1 = new System.Windows.Forms.TabPage();
			TableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
			txtTags = new System.Windows.Forms.TextBox();
			Label1 = new System.Windows.Forms.Label();
			Label3 = new System.Windows.Forms.Label();
			txtDesc = new System.Windows.Forms.RichTextBox();
			txtTitle = new System.Windows.Forms.TextBox();
			Label2 = new System.Windows.Forms.Label();
			Label4 = new System.Windows.Forms.Label();
			TabImage = new System.Windows.Forms.TabPage();
			cmdClearPic = new System.Windows.Forms.Button();
			Picture1 = new System.Windows.Forms.PictureBox();
			txtImageFile = new System.Windows.Forms.TextBox();
			Image2 = new System.Windows.Forms.PictureBox();
			lblImageData = new System.Windows.Forms.Label();
			((System.ComponentModel.ISupportInitialize)Image1).BeginInit();
			TabControl1.SuspendLayout();
			TabPage1.SuspendLayout();
			TableLayoutPanel1.SuspendLayout();
			TabImage.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)Picture1).BeginInit();
			((System.ComponentModel.ISupportInitialize)Image2).BeginInit();
			SuspendLayout();
			cmdSelectImage.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);
			cmdSelectImage.BackColor = System.Drawing.SystemColors.Control;
			cmdSelectImage.Cursor = System.Windows.Forms.Cursors.Default;
			cmdSelectImage.Font = new System.Drawing.Font("Segoe UI", 10f);
			cmdSelectImage.ForeColor = System.Drawing.SystemColors.ControlText;
			cmdSelectImage.Location = new System.Drawing.Point(447, 7);
			cmdSelectImage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			cmdSelectImage.Name = "cmdSelectImage";
			cmdSelectImage.RightToLeft = System.Windows.Forms.RightToLeft.No;
			cmdSelectImage.Size = new System.Drawing.Size(78, 41);
			cmdSelectImage.TabIndex = 27;
			cmdSelectImage.Text = "Select";
			ToolTip1.SetToolTip(cmdSelectImage, "I recommend a size no larger than 300-400 pixels wide. Huge images will be slow to load and should be resampled first.");
			cmdSelectImage.UseVisualStyleBackColor = true;
			txtAKA.AcceptsReturn = true;
			txtAKA.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
			txtAKA.BackColor = System.Drawing.SystemColors.Window;
			txtAKA.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtAKA.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtAKA.ForeColor = System.Drawing.SystemColors.WindowText;
			txtAKA.Location = new System.Drawing.Point(96, 37);
			txtAKA.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtAKA.MaxLength = 0;
			txtAKA.Name = "txtAKA";
			txtAKA.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtAKA.Size = new System.Drawing.Size(431, 25);
			txtAKA.TabIndex = 3;
			ToolTip1.SetToolTip(txtAKA, "Also known as. Separate with ;");
			cmdOK.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
			cmdOK.BackColor = System.Drawing.SystemColors.Control;
			cmdOK.Cursor = System.Windows.Forms.Cursors.Default;
			cmdOK.Font = new System.Drawing.Font("Segoe UI", 10f);
			cmdOK.ForeColor = System.Drawing.SystemColors.ControlText;
			cmdOK.Location = new System.Drawing.Point(474, 401);
			cmdOK.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			cmdOK.Name = "cmdOK";
			cmdOK.RightToLeft = System.Windows.Forms.RightToLeft.No;
			cmdOK.Size = new System.Drawing.Size(118, 43);
			cmdOK.TabIndex = 5;
			cmdOK.Text = "OK";
			cmdOK.UseVisualStyleBackColor = true;
			cmdExit.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left);
			cmdExit.BackColor = System.Drawing.SystemColors.Control;
			cmdExit.Cursor = System.Windows.Forms.Cursors.Default;
			cmdExit.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			cmdExit.Font = new System.Drawing.Font("Segoe UI", 10f);
			cmdExit.ForeColor = System.Drawing.SystemColors.ControlText;
			cmdExit.Location = new System.Drawing.Point(56, 401);
			cmdExit.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			cmdExit.Name = "cmdExit";
			cmdExit.RightToLeft = System.Windows.Forms.RightToLeft.No;
			cmdExit.Size = new System.Drawing.Size(112, 43);
			cmdExit.TabIndex = 4;
			cmdExit.Text = "Cancel";
			cmdExit.UseVisualStyleBackColor = true;
			Image1.Cursor = System.Windows.Forms.Cursors.Default;
			Image1.Image = yWriter6.My.Resources.Resources.yw_Location;
			Image1.Location = new System.Drawing.Point(8, 16);
			Image1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			Image1.Name = "Image1";
			Image1.Size = new System.Drawing.Size(32, 32);
			Image1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
			Image1.TabIndex = 3;
			Image1.TabStop = false;
			TabControl1.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
			TabControl1.Controls.Add(TabPage1);
			TabControl1.Controls.Add(TabImage);
			TabControl1.Location = new System.Drawing.Point(52, 15);
			TabControl1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabControl1.Name = "TabControl1";
			TabControl1.SelectedIndex = 0;
			TabControl1.Size = new System.Drawing.Size(544, 373);
			TabControl1.TabIndex = 4;
			TabPage1.Controls.Add(TableLayoutPanel1);
			TabPage1.Location = new System.Drawing.Point(4, 26);
			TabPage1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabPage1.Name = "TabPage1";
			TabPage1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabPage1.Size = new System.Drawing.Size(536, 343);
			TabPage1.TabIndex = 0;
			TabPage1.Text = "Details";
			TabPage1.UseVisualStyleBackColor = true;
			TableLayoutPanel1.ColumnCount = 2;
			TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
			TableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100f));
			TableLayoutPanel1.Controls.Add(txtTags, 1, 3);
			TableLayoutPanel1.Controls.Add(Label1, 0, 0);
			TableLayoutPanel1.Controls.Add(Label3, 0, 3);
			TableLayoutPanel1.Controls.Add(txtDesc, 1, 2);
			TableLayoutPanel1.Controls.Add(txtTitle, 1, 0);
			TableLayoutPanel1.Controls.Add(txtAKA, 1, 1);
			TableLayoutPanel1.Controls.Add(Label2, 0, 2);
			TableLayoutPanel1.Controls.Add(Label4, 0, 1);
			TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
			TableLayoutPanel1.Location = new System.Drawing.Point(3, 4);
			TableLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TableLayoutPanel1.Name = "TableLayoutPanel1";
			TableLayoutPanel1.RowCount = 4;
			TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100f));
			TableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
			TableLayoutPanel1.Size = new System.Drawing.Size(530, 335);
			TableLayoutPanel1.TabIndex = 4;
			txtTags.AcceptsReturn = true;
			txtTags.Anchor = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
			txtTags.BackColor = System.Drawing.SystemColors.Window;
			txtTags.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtTags.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtTags.ForeColor = System.Drawing.SystemColors.WindowText;
			txtTags.Location = new System.Drawing.Point(96, 306);
			txtTags.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtTags.MaxLength = 0;
			txtTags.Name = "txtTags";
			txtTags.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtTags.Size = new System.Drawing.Size(431, 25);
			txtTags.TabIndex = 7;
			Label1.AutoSize = true;
			Label1.BackColor = System.Drawing.Color.Transparent;
			Label1.Cursor = System.Windows.Forms.Cursors.Default;
			Label1.Dock = System.Windows.Forms.DockStyle.Fill;
			Label1.Font = new System.Drawing.Font("Segoe UI", 10f);
			Label1.ForeColor = System.Drawing.SystemColors.ControlText;
			Label1.Location = new System.Drawing.Point(3, 0);
			Label1.Name = "Label1";
			Label1.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Label1.Size = new System.Drawing.Size(87, 33);
			Label1.TabIndex = 5;
			Label1.Text = "Title:";
			Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			Label3.AutoSize = true;
			Label3.BackColor = System.Drawing.Color.Transparent;
			Label3.Cursor = System.Windows.Forms.Cursors.Default;
			Label3.Dock = System.Windows.Forms.DockStyle.Fill;
			Label3.Font = new System.Drawing.Font("Segoe UI", 10f);
			Label3.ForeColor = System.Drawing.SystemColors.ControlText;
			Label3.Location = new System.Drawing.Point(3, 302);
			Label3.Name = "Label3";
			Label3.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Label3.Size = new System.Drawing.Size(87, 33);
			Label3.TabIndex = 8;
			Label3.Text = "Tags:";
			Label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			txtDesc.AcceptsTab = true;
			txtDesc.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
			txtDesc.BackColor = System.Drawing.SystemColors.Window;
			txtDesc.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtDesc.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtDesc.ForeColor = System.Drawing.SystemColors.WindowText;
			txtDesc.Location = new System.Drawing.Point(96, 70);
			txtDesc.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtDesc.MaxLength = 0;
			txtDesc.Name = "txtDesc";
			txtDesc.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtDesc.Size = new System.Drawing.Size(431, 228);
			txtDesc.TabIndex = 4;
			txtDesc.Text = "";
			txtTitle.AcceptsReturn = true;
			txtTitle.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
			txtTitle.BackColor = System.Drawing.SystemColors.Window;
			txtTitle.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtTitle.Font = new System.Drawing.Font("Segoe UI", 10f);
			txtTitle.ForeColor = System.Drawing.SystemColors.WindowText;
			txtTitle.Location = new System.Drawing.Point(96, 4);
			txtTitle.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtTitle.MaxLength = 0;
			txtTitle.Name = "txtTitle";
			txtTitle.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtTitle.Size = new System.Drawing.Size(431, 25);
			txtTitle.TabIndex = 3;
			Label2.AutoSize = true;
			Label2.BackColor = System.Drawing.Color.Transparent;
			Label2.Cursor = System.Windows.Forms.Cursors.Default;
			Label2.Dock = System.Windows.Forms.DockStyle.Fill;
			Label2.Font = new System.Drawing.Font("Segoe UI", 10f);
			Label2.ForeColor = System.Drawing.SystemColors.ControlText;
			Label2.Location = new System.Drawing.Point(3, 66);
			Label2.Name = "Label2";
			Label2.Padding = new System.Windows.Forms.Padding(6, 6, 0, 0);
			Label2.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Label2.Size = new System.Drawing.Size(87, 236);
			Label2.TabIndex = 6;
			Label2.Text = "Description:";
			Label2.TextAlign = System.Drawing.ContentAlignment.TopRight;
			Label4.AutoSize = true;
			Label4.BackColor = System.Drawing.Color.Transparent;
			Label4.Cursor = System.Windows.Forms.Cursors.Default;
			Label4.Dock = System.Windows.Forms.DockStyle.Fill;
			Label4.Font = new System.Drawing.Font("Segoe UI", 10f);
			Label4.ForeColor = System.Drawing.SystemColors.ControlText;
			Label4.Location = new System.Drawing.Point(3, 33);
			Label4.Name = "Label4";
			Label4.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Label4.Size = new System.Drawing.Size(87, 33);
			Label4.TabIndex = 5;
			Label4.Text = "AKA:";
			Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			TabImage.Controls.Add(cmdClearPic);
			TabImage.Controls.Add(Picture1);
			TabImage.Controls.Add(txtImageFile);
			TabImage.Controls.Add(cmdSelectImage);
			TabImage.Controls.Add(Image2);
			TabImage.Controls.Add(lblImageData);
			TabImage.Location = new System.Drawing.Point(4, 26);
			TabImage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabImage.Name = "TabImage";
			TabImage.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
			TabImage.Size = new System.Drawing.Size(536, 343);
			TabImage.TabIndex = 1;
			TabImage.Text = "Picture";
			TabImage.UseVisualStyleBackColor = true;
			cmdClearPic.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);
			cmdClearPic.BackColor = System.Drawing.SystemColors.Control;
			cmdClearPic.Cursor = System.Windows.Forms.Cursors.Default;
			cmdClearPic.Font = new System.Drawing.Font("Segoe UI", 10f);
			cmdClearPic.ForeColor = System.Drawing.SystemColors.ControlText;
			cmdClearPic.Location = new System.Drawing.Point(447, 56);
			cmdClearPic.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			cmdClearPic.Name = "cmdClearPic";
			cmdClearPic.RightToLeft = System.Windows.Forms.RightToLeft.No;
			cmdClearPic.Size = new System.Drawing.Size(78, 41);
			cmdClearPic.TabIndex = 32;
			cmdClearPic.Text = "Clear";
			cmdClearPic.UseVisualStyleBackColor = true;
			Picture1.BackColor = System.Drawing.SystemColors.Control;
			Picture1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			Picture1.Cursor = System.Windows.Forms.Cursors.Default;
			Picture1.Font = new System.Drawing.Font("Arial", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
			Picture1.ForeColor = System.Drawing.SystemColors.ControlText;
			Picture1.Location = new System.Drawing.Point(320, 83);
			Picture1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			Picture1.Name = "Picture1";
			Picture1.RightToLeft = System.Windows.Forms.RightToLeft.No;
			Picture1.Size = new System.Drawing.Size(62, 49);
			Picture1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
			Picture1.TabIndex = 29;
			Picture1.TabStop = false;
			Picture1.Visible = false;
			txtImageFile.AcceptsReturn = true;
			txtImageFile.BackColor = System.Drawing.SystemColors.Window;
			txtImageFile.Cursor = System.Windows.Forms.Cursors.IBeam;
			txtImageFile.Font = new System.Drawing.Font("Arial", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
			txtImageFile.ForeColor = System.Drawing.SystemColors.WindowText;
			txtImageFile.Location = new System.Drawing.Point(68, 83);
			txtImageFile.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			txtImageFile.MaxLength = 0;
			txtImageFile.Name = "txtImageFile";
			txtImageFile.RightToLeft = System.Windows.Forms.RightToLeft.No;
			txtImageFile.Size = new System.Drawing.Size(168, 20);
			txtImageFile.TabIndex = 28;
			txtImageFile.Visible = false;
			Image2.Cursor = System.Windows.Forms.Cursors.Default;
			Image2.Location = new System.Drawing.Point(316, 149);
			Image2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			Image2.Name = "Image2";
			Image2.Size = new System.Drawing.Size(76, 60);
			Image2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
			Image2.TabIndex = 31;
			Image2.TabStop = false;
			lblImageData.BackColor = System.Drawing.SystemColors.Control;
			lblImageData.Cursor = System.Windows.Forms.Cursors.Default;
			lblImageData.Font = new System.Drawing.Font("Arial", 8f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
			lblImageData.ForeColor = System.Drawing.SystemColors.ControlText;
			lblImageData.Location = new System.Drawing.Point(244, 56);
			lblImageData.Name = "lblImageData";
			lblImageData.RightToLeft = System.Windows.Forms.RightToLeft.No;
			lblImageData.Size = new System.Drawing.Size(122, 23);
			lblImageData.TabIndex = 30;
			lblImageData.Visible = false;
			base.AcceptButton = cmdOK;
			base.AutoScaleDimensions = new System.Drawing.SizeF(7f, 17f);
			base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			BackColor = System.Drawing.SystemColors.Control;
			base.CancelButton = cmdExit;
			base.ClientSize = new System.Drawing.Size(610, 458);
			base.Controls.Add(TabControl1);
			base.Controls.Add(cmdOK);
			base.Controls.Add(cmdExit);
			base.Controls.Add(Image1);
			Cursor = System.Windows.Forms.Cursors.Default;
			DoubleBuffered = true;
			Font = new System.Drawing.Font("Segoe UI", 10f);
			base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
			base.Location = new System.Drawing.Point(4, 23);
			base.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
			MinimumSize = new System.Drawing.Size(449, 301);
			base.Name = "frmEditLocation";
			RightToLeft = System.Windows.Forms.RightToLeft.No;
			base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			Text = "Location";
			((System.ComponentModel.ISupportInitialize)Image1).EndInit();
			TabControl1.ResumeLayout(false);
			TabPage1.ResumeLayout(false);
			TableLayoutPanel1.ResumeLayout(false);
			TableLayoutPanel1.PerformLayout();
			TabImage.ResumeLayout(false);
			TabImage.PerformLayout();
			((System.ComponentModel.ISupportInitialize)Picture1).EndInit();
			((System.ComponentModel.ISupportInitialize)Image2).EndInit();
			ResumeLayout(false);
			PerformLayout();
		}

		public bool Edit(ref clsProject ProjectClass, int ID, int WhichTab = 0)
		{
			cProject = ProjectClass;
			CurrentLocation = cProject.get_LocationByID(ID);
			DataToForm(ref CurrentLocation);
			Saved = false;
			ShowDialog();
			return Saved;
		}

		private void cmdCancel_Click()
		{
			Saved = false;
			Hide();
		}

		private void cmdSave_Click()
		{
			FormToData(ref CurrentLocation);
			Saved = true;
			Hide();
		}

		private void cmdExit_Click(object eventSender, EventArgs eventArgs)
		{
			Saved = false;
			Hide();
		}

		private void cmdOK_Click(object eventSender, EventArgs eventArgs)
		{
			FormToData(ref CurrentLocation);
			Saved = true;
			Hide();
		}

		private void frmEditLocation_Activated(object sender, EventArgs e)
		{
			try
			{
				txtTitle.SelectAll();
				txtTitle.Focus();
			}
			catch (Exception ex)
			{
				ProjectData.SetProjectError(ex);
				Exception ex2 = ex;
				ProjectData.ClearProjectError();
			}
		}

		private void frmEditLocation_Load(object eventSender, EventArgs eventArgs)
		{
			if (Operators.CompareString(clsShared.cLang.CurrentLanguage, "English", TextCompare: false) != 0)
			{
				clsShared.cLang.TranslateForm(this);
			}
			clsShared.cFormFont.SetFormFont(this, clsShared.cSettings.sGet("FormFont", modVariables.DefaultUIFont.Name), clsShared.cSettings.sGet("UIFontSize", modVariables.DefaultUIFont.Size));
			Saved = false;
			clsSettings cSettings = clsShared.cSettings;
			Form Form = this;
			cSettings.ReadWindowSettings("EditLoc", ref Form);
		}

		private void DataToForm(ref clsLocation cLocation)
		{
			txtTitle.Text = cLocation.Title;
			txtDesc.Text = cLocation.DescText;
			txtTags.Text = cLocation.Tags;
			txtAKA.Text = cLocation.AKA;
			txtImageFile.Text = cLocation.ImageFile;
			ref clsProject reference = ref cProject;
			string text = txtImageFile.Text;
			PictureBox Picture = Picture1;
			PictureBox Image = Image2;
			TabPage TabPage = TabImage;
			modSubs.DisplayImage(ref reference, text, ref Picture, ref Image, ref TabPage);
			TabImage = TabPage;
			Image2 = Image;
			Picture1 = Picture;
			txtTitle.SelectAll();
		}

		private void FormToData(ref clsLocation cLocation)
		{
			cLocation.Title = txtTitle.Text;
			cLocation.DescText = txtDesc.Text;
			cLocation.AKA = txtAKA.Text;
			cLocation.Tags = txtTags.Text;
			cLocation.ImageFile = txtImageFile.Text;
			cLocation.Save();
			clsShared.cSettings.StoreWindowSettings("EditLoc", this);
		}

		private void cmdSelectImage_Click(object eventSender, EventArgs eventArgs)
		{
			try
			{
				string text = modSubs.SelectAndCopyImage(ref cProject);
				if (Operators.CompareString(text, "", TextCompare: false) != 0)
				{
					txtImageFile.Text = text;
					ref clsProject reference = ref cProject;
					string text2 = txtImageFile.Text;
					PictureBox Picture = Picture1;
					PictureBox Image = Image2;
					TabPage TabPage = TabImage;
					modSubs.DisplayImage(ref reference, text2, ref Picture, ref Image, ref TabPage);
					TabImage = TabPage;
					Image2 = Image;
					Picture1 = Picture;
				}
			}
			catch (Exception ex)
			{
				ProjectData.SetProjectError(ex);
				Exception ex2 = ex;
				clsShared.cLog.AddAction(ex2, MethodBase.GetCurrentMethod());
				ProjectData.ClearProjectError();
			}
		}

		private void cmdClearPic_Click(object sender, EventArgs e)
		{
			Image2.Image = null;
			txtImageFile.Text = "";
		}
	}
}
